<!--{template lyear:header_simple_start}-->
<!--{template lyear:header_simple_end}-->
<main class="bs-main-container">
	<div class="container-fluid">
    <div class="card">
      <div class="card-body">
          <ul class="nav nav-pills">
            <li class="nav-item">
              <a class="nav-link <!--{if !$fieldid}-->active<!--{/if}-->" href="{MOD_URL}&op=profileset">{lang data_item_list}</a>
            </li>
            <!--{if $fieldid}-->
            <li class="nav-item">
              <a class="nav-link active" href="{MOD_URL}&op=profileset&fieldid=$fieldid">{lang data_edit}</a>
            </li>
            <!--{/if}-->
          </ul>
      </div>
    </div>
    <div class="card">
      <div class="card-body">
          <form id="cpform" action="{MOD_URL}&op=profileset" class="form-horizontal" method="post" name="cpform">
            <input type="hidden" value="{FORMHASH}" name="formhash">
            <input type="hidden" value="true" name="editsubmit">
            <input type="hidden" value="$fieldid" name="fieldid">
            <input type="hidden" value="$field[displayorder]" name="displayorder">
            <div class="row mb-3">
              <label class="col-sm-2">{lang name}</label>
              <div class="col-sm-10">
                <input type="text" class="form-control" value="$field[title]" name="title" required="required" <!--{if $field[isfixed2]}-->disabled="disabled"
                <!--{/if}-->/>
              </div>
            </div>
            <div class="row mb-3">
              <label class="col-sm-2">{lang introduce}</label>
              <div class="col-sm-10">
                <input type="text" class="form-control" value="$field[description]" name="description" <!--{if $field[isfixed2]}-->disabled="disabled"
                <!--{/if}-->/>
              </div>
            </div>
            <!--{if !$field[isfixed2]}-->
            <div class="row mb-3">
              <label class="col-sm-2">{lang form_type}</label>
              <div class="col-sm-10">
                <div class="form-check form-check-inline">
                  <input class="form-check-input" type="radio" id="formtype1" name="formtype" value="text" onclick="document.getElementById('valuenumber').style.display = '';document.getElementById('fieldchoices').style.display = 'none';document.getElementById('fieldvalidate').style.display = '';" <!--{if $field[formtype]=='text'}-->checked="checked"<!--{/if}-->>
                  <label class="form-check-label" for="formtype1">{lang HtmlInputText}</label>
                </div>
                <!--{if $fieldid!='realname'}-->
                <div class="form-check form-check-inline">
                  <input class="form-check-input" type="radio" id="formtype2" name="formtype" value="textarea" onclick="document.getElementById('valuenumber').style.display = '';document.getElementById('fieldchoices').style.display = 'none';document.getElementById('fieldvalidate').style.display = '';" <!--{if $field[formtype]=='textarea'}-->checked="checked"<!--{/if}-->>
                  <label class="form-check-label" for="formtype2">{lang HtmlTextArea}</label>
                </div>
                <div class="form-check form-check-inline">
                  <input class="form-check-input" type="radio" id="formtype3" name="formtype" value="radio" onclick="document.getElementById('valuenumber').style.display = 'none';document.getElementById('fieldchoices').style.display = '';document.getElementById('fieldvalidate').style.display = 'none';" <!--{if $field[formtype]=='radio'}-->checked="checked"<!--{/if}-->>
                  <label class="form-check-label" for="formtype3">{lang radio}</label>
                </div>
                <div class="form-check form-check-inline">
                  <input class="form-check-input" type="radio" id="formtype4" name="formtype" value="checkbox" onclick="document.getElementById('valuenumber').style.display = '';document.getElementById('fieldchoices').style.display = '';document.getElementById('fieldvalidate').style.display = 'none';" <!--{if $field[formtype]=='checkbox'}-->checked="checked"<!--{/if}-->>
                  <label class="form-check-label" for="formtype4">{lang checkBox}</label>
                </div>
                <div class="form-check form-check-inline">
                  <input class="form-check-input" type="radio" id="formtype5" name="formtype" value="select" onclick="document.getElementById('valuenumber').style.display = 'none';document.getElementById('fieldchoices').style.display = '';document.getElementById('fieldvalidate').style.display = 'none';" <!--{if $field[formtype]=='select'}-->checked="checked"<!--{/if}-->>
                  <label class="form-check-label" for="formtype5">{lang combobox}</label>
                </div>
                <div class="form-check form-check-inline">
                  <input class="form-check-input" type="radio" id="formtype6" name="formtype" value="list" onclick="document.getElementById('valuenumber').style.display = '';document.getElementById('fieldchoices').style.display = '';" <!--{if $field[formtype]=='list'}-->checked="checked"<!--{/if}-->>
                  <label class="form-check-label" for="formtype6">{lang more_choose_list}</label>
                </div>
                <div class="form-check form-check-inline">
                  <input class="form-check-input" type="radio" id="formtype7" name="formtype" value="file" onclick="document.getElementById('valuenumber').style.display = '';document.getElementById('fieldchoices').style.display = 'none';document.getElementById('fieldvalidate').style.display = 'none';" <!--{if $field[formtype]=='file'}-->checked="checked"<!--{/if}-->>
                  <label class="form-check-label" for="formtype7">{lang upload_image}</label>
                </div>
                <!--{/if}-->
              </div>
            </div>
            <div class="row mb-3" id="valuenumber" <!--{if $field[formtype]=='select' || $field[formtype]=='radio' }-->style="display:none"<!--{/if}-->>
              <label class="col-sm-2">{lang hawkeye_shellinit}</label>
              <div class="col-sm-10">
                <input name="size" value="$field[size]" type="text" class="form-control">
                <span class="form-text">{lang profileset_edit_delete}</span>
              </div>
            </div>
            <div class="row mb-3" id="fieldchoices" <!--{if $field[formtype]=='text' || $field[formtype]=='textarea' || $field[formtype]=='file' }-->style="display:none"<!--{/if}-->>
              <label class="col-sm-2">{lang option_values}</label>
              <div class="col-sm-10">
                <textarea rows="6" name="choices" id="choices" class="form-control">$field[choices]</textarea>
                <span class="form-text">{lang profileset_edit_value}:<br>{lang beijing}<br>{lang shanghai}<br></span>
              </div>
            </div>
            <div class="row mb-3" id="fieldvalidate" <!--{if $field[formtype]=='radio' || $field[formtype]=='select' || $field[formtype]=='list' || $field[formtype]=='checkbox' || $field[formtype]=='file' }-->style="display:none"<!--{/if}-->>
              <label class="col-sm-2">{lang regular_verification}</label>
              <div class="col-sm-10">
                <input name="validate" value="$field[validate]" type="text" class="form-control">
                <span class="form-text">{lang profileset_edit_edit}</span>
              </div>
            </div>
            <!--{/if}-->
            <div class="row mb-3">
              <label class="col-sm-2">{lang members_verify_enable}</label>
              <div class="col-sm-10">
                <div class="form-check form-check-inline">
                  <input class="form-check-input" type="radio" id="available1" name="available" value="1" <!--{if $field[available]}-->checked="checked"<!--{/if}-->>
                  <label class="form-check-label" for="available1">{lang enable}</label>
                </div>
                <div class="form-check form-check-inline">
                  <input class="form-check-input" type="radio" id="available2" name="available" value="0" <!--{if !$field[available]}-->checked="checked"<!--{/if}-->>
                  <label class="form-check-label" for="available2">{lang no_enable}</label>
                </div>
              </div>
            </div>
            <!--{if !$field['isfixed1']}-->
            <div class="row mb-3">
              <label class="col-sm-2">{lang submit_hou}</label>
              <div class="col-sm-10">
                <div class="form-check form-check-inline">
                  <input class="form-check-input" type="radio" id="available1" name="unchangeable" value="1" <!--{if $field[unchangeable]}-->checked="checked"<!--{/if}-->>
                  <label class="form-check-label" for="unchangeable1">{lang no_modification}</label>
                </div>
                <div class="form-check form-check-inline">
                  <input class="form-check-input" type="radio" id="available2" name="unchangeable" value="0" <!--{if !$field[unchangeable]}-->checked="checked"<!--{/if}-->>
                  <label class="form-check-label" for="unchangeable2">{lang revisability}</label>
                </div>
              </div>
            </div>
            <div class="row mb-3">
              <label class="col-sm-2">{lang modification_hou}</label>
              <div class="col-sm-10">
                <div class="form-check form-check-inline">
                  <input class="form-check-input" type="radio" id="available1" name="needverify" value="1" <!--{if $field[needverify]}-->checked="checked"<!--{/if}-->>
                  <label class="form-check-label" for="needverify1">{lang need_moderate}</label>
                </div>
                <div class="form-check form-check-inline">
                  <input class="form-check-input" type="radio" id="available2" name="needverify" value="0" <!--{if !$field[needverify]}-->checked="checked"<!--{/if}-->>
                  <label class="form-check-label" for="needverify2">{lang no_need_moderate}</label>
                </div>
              </div>
            </div>
            <div class="row mb-3">
              <label class="col-sm-2">{lang if_required}</label>
              <div class="col-sm-10">
                <div class="form-check form-check-inline">
                  <input class="form-check-input" type="radio" id="required1" name="required" value="1" <!--{if $field[required]}-->checked="checked"<!--{/if}-->>
                  <label class="form-check-label" for="required1">{lang required}</label>
                </div>
                <div class="form-check form-check-inline">
                  <input class="form-check-input" type="radio" id="required2" name="required" value="0" <!--{if !$field[required]}-->checked="checked"<!--{/if}-->>
                  <label class="form-check-label" for="required2">{lang certificate}</label>
                </div>
              </div>
            </div>
            <div class="row mb-3">
              <label class="col-sm-2">{lang data_page}</label>
              <div class="col-sm-10">
                <div class="form-check form-check-inline">
                  <input class="form-check-input" type="radio" id="invisible1" name="invisible" value="1" <!--{if $field[invisible]}-->checked="checked"<!--{/if}-->>
                  <label class="form-check-label" for="invisible1">{lang hide}</label>
                </div>
                <div class="form-check form-check-inline">
                  <input class="form-check-input" type="radio" id="invisible2" name="invisible" value="0" <!--{if !$field[invisible]}-->checked="checked"<!--{/if}-->>
                  <label class="form-check-label" for="invisible2">{lang show}</label>
                </div>
                <span class="form-text">{lang profileset_edit_hide}</span>
              </div>
            </div>
            <!--{/if}-->
            <div class="row mb-3">
              <label class="col-sm-2">{lang default_privacy}</label>
              <div class="col-sm-10">
                <div class="form-check form-check-inline">
                  <input class="form-check-input" type="radio" id="privacy1" name="privacy" value="-1"  <!--{if $_G['setting']['privacy']['profile'][$fieldid]=='-1'}-->checked="checked"<!--{/if}-->>
                  <label class="form-check-label" for="privacy1">{lang secret}</label>
                </div>
                <div class="form-check form-check-inline">
                  <input class="form-check-input" type="radio" id="privacy2" name="privacy" value="0"  <!--{if empty($_G['setting']['privacy']['profile'][$fieldid])}-->checked="checked"<!--{/if}-->>
                  <label class="form-check-label" for="privacy2">{lang public}</label>
                </div>
                <div class="form-check form-check-inline">
                  <input class="form-check-input" type="radio" id="privacy3" name="privacy" value="1"  <!--{if $_G['setting']['privacy']['profile'][$fieldid]=='1'}-->checked="checked"<!--{/if}-->>
                  <label class="form-check-label" for="privacy3">{lang department_visible}</label>
                </div>
                <div class="form-check form-check-inline">
                  <input class="form-check-input" type="radio" id="privacy4" name="privacy" value="2"  <!--{if $_G['setting']['privacy']['profile'][$fieldid]=='2'}-->checked="checked"<!--{/if}-->>
                  <label class="form-check-label" for="privacy4">{lang institution_visible}</label>
                </div>

              </div>

            </div>
            <div class="row mb-3">
              <label class="col-sm-2">{lang business_card}：</label>
              <div class="col-sm-10">
                <div class="form-check form-check-inline">
                  <input class="form-check-input" type="radio" id="showincard1" name="showincard" value="1" <!--{if $field[showincard]}-->checked="checked"<!--{/if}-->>
                  <label class="form-check-label" for="showincard1">{lang show}</label>
                </div>
                <div class="form-check form-check-inline">
                  <input class="form-check-input" type="radio" id="showincard2" name="showincard" value="0" <!--{if !$field[showincard]}-->checked="checked"<!--{/if}-->>
                  <label class="form-check-label" for="showincard2">{lang no_show}</label>
                </div>
              </div>
            </div>
            <div class="row mb-3">
              <label class="col-sm-2">{lang registration_page}：</label>
              <div class="col-sm-10">
                <div class="form-check form-check-inline">
                  <input class="form-check-input" type="radio" id="showinregister1" name="showinregister" value="1" <!--{if $field[showinregister]}-->checked="checked"<!--{/if}-->>
                  <label class="form-check-label" for="showinregister1">{lang show}</label>
                </div>
                <div class="form-check form-check-inline">
                  <input class="form-check-input" type="radio" id="showinregister2" name="showinregister" value="0" <!--{if !$field[showinregister]}-->checked="checked"<!--{/if}-->>
                  <label class="form-check-label" for="showinregister2">{lang no_show}</label>
                </div>
              </div>
            </div>
            <div class="row mb-3">
              <label class="col-sm-2">{lang allow_search}：</label>
              <div class="col-sm-10">
                <div class="form-check form-check-inline">
                  <input class="form-check-input" type="radio" id="allowsearch1" name="allowsearch" value="1" <!--{if $field[allowsearch]}-->checked="checked"<!--{/if}-->>
                  <label class="form-check-label" for="allowsearch1">{lang allow_search}</label>
                </div>
                <div class="form-check form-check-inline">
                  <input class="form-check-input" type="radio" id="sallowsearch2" name="allowsearch" value="0" <!--{if !$field[allowsearch]}-->checked="checked"<!--{/if}-->>
                  <label class="form-check-label" for="allowsearch2">{lang no_allow_search}</label>
                </div>
              </div>
            </div>
            <dl class="mb-3 d-grid">
              <input type="submit" class="btn btn-primary btn-round bodyloading" name="editsubmit" value="{lang save_set}">
            </dl>
          </form>
      </div>
    </div>
  </div>
</main>
<script type="text/javascript">
	var url = '{MOD_URL}';
	jQuery(document).ready(function(e) {
		jQuery(document).on('blur', 'input[required]', function() {
			var self = this;
			var val = this.value;
			if(this.value == '') {
				jQuery(this).addClass('input-error');
			} else if(jQuery(this).hasClass('fieldid')) {
				jQuery('.fieldid').not(this).each(function() {
					if(jQuery(this).is('td') && this.innerHTML == val) {
						jQuery(self).addClass('input-error');
						showmessage('{lang identifier_use}', 'danger', 3000, 1);
						return;
					} else if(jQuery(this).is('input') && this.value == val) {
						jQuery(self).addClass('input-error');
						showmessage('{lang identifier_use}', 'danger', 3000, 1);
						return;
					}
				});
			} else {
				jQuery(this).removeClass('input-error');
			}
		});
		jQuery(document).on('change', 'input[required]', function() {
			if(this.value == '') { jQuery(this).addClass('input-error') } else { jQuery(this).removeClass('input-error'); }
		});
	});
</script>
<!--{template lyear:footer_simple}-->